<!--
XML Schema for the SMIL 2.0 Linking functionality.

This is SMIL 2.0
Copyright: 1998-2004 W3C (MIT, ERCIM, Keio), All Rights Reserved.
See http://www.w3.org/Consortium/Legal/.

Public URI: http://www.w3.org/2001/SMIL20/smil20-linking.xsd
Author: Aaron Michael Cohen (Intel)
Revision: 2004/06/03 by Thierry MICHEL
Revision includes update of Errata E26
see (http://www.w3.org/2001/07/REC-SMIL20-20010731-errata#E26)

Defines both the local and global smil20 linking attributes.
-->
<schema xmlns="http://www.w3.org/2001/XMLSchema"
        xmlns:smil20="http://www.w3.org/2001/SMIL20/"
        xmlns:smil20lang="http://www.w3.org/2001/SMIL20/Language"
        targetNamespace="http://www.w3.org/2001/SMIL20/"
        elementFormDefault="qualified">
    
    <!-- linking attribute types -->
    <simpleType name="sourcePlaystateType">
        <restriction base="string">
            <enumeration value="play"/>
            <enumeration value="pause"/>
            <enumeration value="stop"/>
        </restriction>
    </simpleType>

    <simpleType name="destinationPlaystateType">
        <restriction base="string">
            <enumeration value="play"/>
            <enumeration value="pause"/>
        </restriction>
    </simpleType>

    <simpleType name="showType">
        <restriction base="string">
            <enumeration value="new"/>
            <enumeration value="pause"/>
            <enumeration value="replace"/>
        </restriction>
    </simpleType>

    <simpleType name="actuateType">
        <restriction base="string">
            <enumeration value="onRequest"/>
            <enumeration value="onLoad"/>
        </restriction>
    </simpleType>

    <!-- global linking attributes -->
    <attribute name="sourceLevel" type="smil20:positivePercentageType"/>
    <attribute name="destinationLevel" type="smil20:positivePercentageType"/>
    <attribute name="sourcePlaystate" type="smil20:sourcePlaystateType"/>      
    <attribute name="destinationPlaystate" type="smil20:destinationPlaystateType"/>
    <attribute name="show" type="smil20:showType"/>
    <attribute name="external" type="boolean"/>
    <attribute name="actuate" type="smil20:actuateType"/>
    <attribute name="accesskey" type="string"/>
    <attribute name="target" type="string"/>

    <!-- linking attributes from the LinkingAttributes module -->
    <attributeGroup name="linkingAttrs">
        <attribute name="sourceLevel" type="smil20:positivePercentageType" use="optional"/>
        <attribute name="destinationLevel" type="smil20:positivePercentageType" use="optional"/>
        <attribute name="sourcePlaystate" type="smil20:sourcePlaystateType" use="optional"/>      
        <attribute name="destinationPlaystate" type="smil20:destinationPlaystateType" use="optional"/>
        <attribute name="show" type="smil20:showType" use="optional"  default="replace"/>
        <attribute name="external" type="boolean" use="optional"  default="false"/>
        <attribute name="actuate" type="smil20:actuateType" use="optional"  default="onRequest"/>
        <attribute name="accesskey" type="string" use="optional"/>
        <attribute name="target" type="string" use="optional"/>
        <attributeGroup ref="smil20:tabindexAttrs"/>
    </attributeGroup>

    <!-- global tabindex attribute -->
    <attribute name="tabindex" type="integer"/>

    <!-- tabindex attribute group -->
    <attributeGroup name="tabindexAttrs">
        <attribute name="tabindex" type="integer" use="optional"/>
    </attributeGroup>

    <!-- fragment attribute group -->
    <attributeGroup name="fragmentAttrs">
        <attribute name="fragment" type="string" use="optional"/>
    </attributeGroup>

    <!-- define the a element prototype -->
    <complexType name="aPrototype">
        <attributeGroup ref="smil20:linkingAttrs"/>
        <attribute name="href" type="anyURI" use="required"/>
    </complexType>        

    <!-- define the area element prototype -->
    <complexType name="areaPrototype">
        <attributeGroup ref="smil20:linkingAttrs"/>
        <attribute name="nohref" use="optional"/>
         <simpleType>
           <restriction base="string"> 
             <enumeration value="nohref"/>
           </restriction>
         </simpleType> 
        </attribute>
        
        <attribute name="shape" type="string" use="optional"/>
        <attribute name="coords" type="string" use="optional"/>
    </complexType>        

    <!-- global linking elements -->
    <element name="a" type="smil20lang:aType" substitutionGroup="smil20lang:a"/>    
    <element name="area" type="smil20lang:areaType" substitutionGroup="smil20lang:area"/>    
    <element name="anchor" type="smil20lang:anchorType" substitutionGroup="smil20lang:anchor"/>    

</schema>
